#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char* my_strstr(const char* str1,const char* str2)
{
	const char* s1 = NULL;
	const char* s2 = NULL;
	const char* cur = str1;
	if (*str2 == '\0')
	{
		return (char*) str1;
	}
	while (*cur)
	{
		s1 = cur;
		s2 = str2;
		while (*s1!='\0' && *s2 != '\0' && *s1 == *s2)
		{
			s1++;
			s2++;
		}
		if (*s2 == '\0')
		{
			return (char*)cur;
		}
		cur++;
	}
	return NULL;
}
int main()
{
	const char* p1 = "abbbcdef";
	const char* p2 = "bbc";
	char* p = my_strstr(p1, p2);
	printf("%s\n", p);
	return 0;
}